package com.xbongbong.saas.enums.dictionary;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * @author zcp
 * @version v1.0
 * @date 2019/3/4 10:20
 * @since v1.0
 */
@Getter
public enum DictionaryTermEnum {

    /**
     * 在tb_data_dictionary表内的数据字段，在该分组，不用限制formId(全公司级)
     */
    DATA_DICTIONARY_TERM(1, "enum.dictionaryTerm.name.data_dictionary_term"),
    /**
     * 在tb_form_data_dictionary表内的数据字段，在该分组，必须传formId（表单级）
     */
    FORM_DATA_DICTIONARY_TERM(2, "enum.dictionaryTerm.name.form_data_dictionary_term"),
    /**
     * 在tb_paas_form_explain表内的下拉型字段的选项，在该分组，必须传formId（字段级）
     */
    PAAS_FORM_EXPLAIN_TERM(3, "enum.dictionaryTerm.name.paas_form_explain_term"),

    /**
     * 在tb_customer_stage表内的客户阶段
     */
    CUSTOMER_STAGE(4, "enum.dictionaryTerm.name.customer_stage"),

    /**
     * 在tb_sale_stage表内的机会阶段
     */
    SALE_STAGE(5, "enum.dictionaryTerm.name.sale_stage"),

    CLUE_STAGE(6, "enum.dictionaryTerm.name.clue_stage"),


    /**
     * 异常
     */
    UNKNOWN(404, "enum.dictionaryTerm.name.unknown"),
    ;
    private Integer code;
    private String name;

    DictionaryTermEnum(Integer code, String name){
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
